Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of github.com/gogo/protobuf #526

Merged
merged 7 commits into from
Jan 16, 2025
Merged

Conversation

roblaszczak
Copy link
Member

@roblaszczak roblaszczak commented Dec 16, 2024

Motivation / Background

github.com/gogo/protobuf is deprecated and doesn't work with newer protobuf files. It's time to switch to standard protobuf.

Detail

It's important that this change won't affect services that are using the old marshaled.
Unfortunately, gogo protobuf doesn't handle messages generated by newer protobuf (it even panics).
To allow simple migration, in the old marshaled, I added an optional fallback (enabled by default) to github.com/golang/protobuf/proto when gogo failed to marshal/unmarshal message.
Thanks to that, it's possible to create a two-step migration:

  1. Updating all publishers and subscribers Watermill (so forward compatibility will be added) - no code change required
  2. Updating to the non-deprecated marshaler.

Checklist

The resources of our team are limited. There are a couple of things that you can do to help us merge your PR faster:

  • I wrote tests for the changes.
  • All tests are passing.
    • If you are testing a Pub/Sub, you can start Docker with make up.
    • You can start with make test_short for a quick check.
    • If you want to run all tests, use make test.
  • Code has no breaking changes.
  • (If applicable) documentation on watermill.io is updated.

@roblaszczak
Copy link
Member Author

before merging, we need to check if it's backward compatible with messages generated with gogo

@roblaszczak roblaszczak changed the title [EXPERIMENTAL] get rid of gogo proto get rid of gogo proto Jan 14, 2025
@roblaszczak roblaszczak changed the title get rid of gogo proto get rid of github.com/gogo/protobuf Jan 14, 2025
@roblaszczak roblaszczak marked this pull request as ready for review January 14, 2025 10:50
@roblaszczak roblaszczak requested a review from m110 January 14, 2025 10:55
@roblaszczak roblaszczak merged commit bb19254 into master Jan 16, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants